package com.blacktry.entity.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 
 * </p>
 *
 * @author blackTry
 * @since 2021-12-05
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="CourseDistribution对象", description="")
public class CourseDistribution implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "id")
    private Integer id;

    @ApiModelProperty(value = "班级id")
    private String classId;

    @ApiModelProperty(value = "课程id")
    private String courseId;

    @ApiModelProperty(value = "老师id")
    private String userId;


    @ApiModelProperty(value = "课程的逻辑时间")
    private Integer logicTime;

    @ApiModelProperty(value = "教室id")
    private Integer classroomId;

    @ApiModelProperty(value = "标记")
    private String remark;


    /**
     * 展示的隐藏数据
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "老师名字")
    private String userName;

    @TableField(exist = false)
    @ApiModelProperty(value = "教室名字")
    private String className;

    @TableField(exist = false)
    @ApiModelProperty(value = "课程名字")
    private String courseName;

    @TableField(exist = false)
    @ApiModelProperty(value = "教室提示")
    private String classroomTip;

    @TableField(exist = false)
    @ApiModelProperty(value = "教师提示")
    private String teacherTip;

    public CourseDistribution(CourseDistribution courseDistribution) {
        // 供拆分课程班级时使用
//        this.classId = courseDistribution.getClassId();
        this.classId = courseDistribution.getClassId();
        this.courseId = courseDistribution.getCourseId();
        this.userId = courseDistribution.getUserId();
        this.logicTime = courseDistribution.getLogicTime();
        this.classroomId = courseDistribution.getClassroomId();
        this.remark = courseDistribution.getRemark();
    }
}
